package com.ustb.springboot.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;

import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @author pyn
 * @date 2022-05-17 11:26:55
 */
@Accessors(chain = true)
@Data
@TableName("tb_option")
public class OptionEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	// 选择题选项
	@TableId
	private String id;
	// 问卷id
	private String formId;
	// 问题id
	private String questionId;
	// 选型类型  0 单选 1多选
	private Integer optType;
	// 选项内容
	private String content;
	// 选项序号
	private Integer orderId;

	public int compareTo(OptionEntity o){
		return String.valueOf(this.getOrderId()).compareTo(String.valueOf(o.getOrderId()));
	}
}
